package models

type MaRobotEmptyStock struct {
	ID                string `gorm:"primaryKey;column:id;type:varchar(20);not null" json:"id"`
	Type              int    `gorm:"column:type;type:int;not null;default:1;comment:类型:1单日空货,2连续空货"  json:"type"`
	MerchantID        string `gorm:"index:idx_date_merchantID,priority:2;column:merchant_id;type:bigint;not null;comment:商户ID" json:"merchant_id"`
	RobotName         string `gorm:"index:idx_date_robotName,priority:2;column:robot_name;type:varchar(50);not null;comment:机器名称" json:"robot_name"`
	Date              string `gorm:"index:idx_date_robotName,priority:1;index:idx_date_merchantID,priority:1;column:date;varchar(20);not null;comment:日期" json:"date"`
	LocationID        string `gorm:"column:location_id;type:bigint;not null;default:0;comment:位置ID" json:"location_id"`
	ContainerNum      int    `gorm:"column:container_num;type:int(2) unsigned zerofill;not null;default:00;comment:货柜编号" json:"container_num"`
	GoodsID           int64  `gorm:"column:goods_id;type:bigint;not null;default:0;comment:商品ID" json:"goods_id"`
	GoodsName1        string `gorm:"column:goods_name1;type:varchar(255);not null;default:'';comment:商品名称" json:"goods_name1"`
	GoodsInventory    int64  `gorm:"column:goods_inventory;type:bigint;default:0;comment:截止当前18点机器商品的库存为0,记录库存节点作用" json:"goods_inventory" json_old:"GoodsInventory"`
	GoodsMaxInventory int64  `gorm:"column:goods_max_inventory;type:bigint;default:0;comment:截止当前18点机器的商品设置的允许最大库存,记录库存节点作用" json:"goods_max_inventory" json_old:"GoodsMaxInventory"`
	CreatedAt         int64  `json:"created_at" gorm:"column:created_at;autoCreateTime;type:int;size:64;comment:创建时间"`
}

func (m MaRobotEmptyStock) TableName() string {
	return "ma_robot_empty_stock"
}

// 模式自动注册
func init() {
	Models = append(Models, &MaRobotEmptyStock{})
}
